<template>
  <div class="classify app_content">
    <!-- 导航栏  titelText="详情信息"-->
    <div class="header_body">
      <header-nav :slefBack="true" @goBack="goBack"> </header-nav>
    </div>
    <div class="detail_body" style="height: 100%;overflow-y: auto">
      <van-cell-group inset>

        <van-cell title="机具大类" :value="itemInfo.machineryLargeCategory" />
        <van-cell title="机具小类" :value="itemInfo.machinerySmallCategory" />
        <van-cell title="机具品目" :value="itemInfo.machineryItem" />
        <van-cell title="生产企业" :value="itemInfo.produceEnterprise" />
        <van-cell title="产品名称" :value="itemInfo.productName" />
        <van-cell title="型号" :value="itemInfo.model" />
<!--        <van-cell title="详情链接地址" :label="itemInfo.detailLink" />-->
        <van-cell title="基本配置与参数" :label="itemInfo.baseInfo" />
        <van-cell title="分档名称" :label="itemInfo.gradingName" />
        <van-cell title="详情链接地址" is-link @click="download(itemInfo.detailLink)"/>
      </van-cell-group>
    </div>
  </div>
</template>
<script setup name="ManagementMachinesItemInfo">
const router = useRouter();
const itemInfo = ref({})
onMounted(() => {
  const query = router?.currentRoute?.value?.query;
  itemInfo.value = JSON.parse(query.itemInfo)
})
const download = (item) => {
  window.open(item); //url为下载http地址
}
const goBack = () => {
  router.go(-1);
};

</script>
<style lang="less" scoped>
.text-button {
  color: #1989fa;
}
.classify {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background-color: #f4f4f4;
}
</style>